package com.chinaums.fsp.sdk.request;

import com.chinaums.fsp.base.pgt.TransType;
import com.chinaums.fsp.sdk.base.RequestData;
import com.chinaums.fsp.sdk.base.ResponseDataWrapper;
import com.chinaums.fsp.sdk.pgt.params.PledgeEndorseRequest;
import com.chinaums.fsp.sdk.pgt.params.PledgeEndorseResponse; 
/**
 * 汇票交易核验查询
 * @author hhh
 */
public class PledgeEndorseTest extends BaseRequest{

	public void testPledgeEndorseRequest1() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSPLEDGE_ENDORSE.getTransCode());
		
		PledgeEndorseRequest data = PledgeEndorseRequest.newBuilder()
															.setOrigServerTransId("1301012017102222571775359520")
															// 交易类型: 1-质押 2-解押
															.setTransType(1)
															.build()
															;
		rf.transType(TransType.TRANSPLEDGE_ENDORSE.getTransCode())
		.responseClass(PledgeEndorseResponse.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
	
		this.print(rdw);
	}

	public void testPledgeEndorseRequest2() throws Exception {
		
		PgtRequestFactory rf = FACTORY.factory();
		
		RequestData.Builder builder = this.createRequestDataBuilder();
		builder.setTransType(TransType.TRANSPLEDGE_ENDORSE.getTransCode());
		
		PledgeEndorseRequest data = PledgeEndorseRequest.newBuilder()
															.setOrigClientTransId("20171022225711033941")
															// 交易类型: 1-质押 2-解押
															.setTransType(1)
															.build()
															;
		rf.transType(TransType.TRANSPLEDGE_ENDORSE.getTransCode())
		.responseClass(PledgeEndorseResponse.class)
		.data(data)
		;
		ResponseDataWrapper rdw = rf.post();
		
		this.print(rdw);
	}
	
	
}